//
//  UIImage+Gradient.h
//  GradientLabel
//
//  Created by 万孟超 on 2022/1/19.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, UIImageGradientType) {
    UIImageGradientTypeTopToBottom = 0,//从上到小
    UIImageGradientTypeLeftToRight = 1,//从左到右
    UIImageGradientTypeUpleftToLowright = 2,//左上到右下
    UIImageGradientTypeUprightToLowleft = 3,//右上到左下
};

NS_ASSUME_NONNULL_BEGIN

@interface UIImage (Gradient)

/**
 生成渐变色的图片
 
 @param colors 颜色值
 @param imgSize 图片大小
 @return 生成的图片
 */
+ (UIImage *)gradientColorImageFromColors:(NSArray *)colors gradientType:(UIImageGradientType)gradientType imgSize:(CGSize)imgSize;

@end

NS_ASSUME_NONNULL_END
